package com.magicmovie.service.impl;

import com.magicmovie.entity.IndexCategory;
import com.magicmovie.mapper.IndexCategoryMapper;
import com.magicmovie.service.IndexCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@Service
public class IndexCategoryServiceImpl implements IndexCategoryService {
    @Autowired
    private IndexCategoryMapper indexCategoryMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return indexCategoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(@RequestBody IndexCategory record) {
        return indexCategoryMapper.insert(record);
    }

    @Override
    public IndexCategory selectByPrimaryKey(Integer id) {
        return indexCategoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(@RequestBody IndexCategory record) {
        return indexCategoryMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<IndexCategory> findAll() {
        return indexCategoryMapper.findAll();
    }

    @Override
    public List<IndexCategory> selectByParams(@RequestBody Map<String, Object> params) {
        return indexCategoryMapper.selectByParams(params);
    }
}
